package com.lph.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lph.service.ReportService;
import com.lph.util.HighChartUtil;
import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;

@RequestMapping("/pc")
@Controller
public class ReportController {
	@Autowired
	private ReportService ps;
	
	@RequestMapping("/index.coc")
	public String index(){
		return "/report/report";
	}
	
	@RequestMapping("/pie.coc")
	public String pie(){
		return "/report/pie";
	}
	@RequestMapping("/column.coc")
	public String column(){
		System.out.println("hifhsdhf");
		return "/report/column";
	}
	
	@RequestMapping("/line.coc")
	public String line(){
		return "/report/line";
	}
	@RequestMapping("/getPieStr.coc")
	@ResponseBody
	public String getPieStr(){
		return ps.getPieData();
	}
	@RequestMapping("/getCoulmn/{type}.coc")
	@ResponseBody
	public String getColumn(@PathVariable(value="type") String type){
		System.out.println(type);
		return ps.getColumn(type);
	}
}
